package com.ewo.service.impl.ApplicationPage;

import com.ewo.entity.ApplicationPage.CustomerInformation;
import com.ewo.mapper.CustomerInformationMapper;
import com.ewo.service.ApplicationPage.CustomerInformationService;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;

@Service
public class CustomerInformationServiceImpl implements CustomerInformationService {
    @Resource
    CustomerInformationMapper customerInformationMapper;

    //查找所有用户
    public List<CustomerInformation> findAllCustomerInformation(){
        return customerInformationMapper.findAllCustomerInformation();
    }

    //查找员工关联用户
    public List<CustomerInformation> findCustomerInformationByEmp(int empId ){
        return customerInformationMapper.findCustomerInformationByEmp(empId);
    }

    //查询单个用户信息
    public CustomerInformation findCustomerInformationByName(String name){
        return customerInformationMapper.findCustomerInformationByName(name);
    }

    //查询用户id查找单个用户信息
    public CustomerInformation findCustomerInformationByCid(int cid){
        return customerInformationMapper.findCustomerInformationByCid(cid);
    }
    //添加用户
    public int addCustomerInformation(CustomerInformation customerInformation){
        return customerInformationMapper.addCustomerInformation(customerInformation);
    }
}
